/*设置路由，获取地址栏的参数 */
function getUrlParms(name) {
    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
    var r = window.location.search.substr(1).match(reg);
    if (r != null) return r[2];
    return null;
}
var productid = getUrlParms("productid");
var nameOne = getUrlParms("name");
console.log(decodeURI(nameOne), 7777);

$.ajax({
    url: `http://chst.vip:1234/api/getmoneyctrlproduct?productid=${productid}`,

    success(res) {
        // console.log(res);
        let html = ""
        let section = ""
        let uu = document.querySelector("ul")
        let comment = document.querySelector(".comment")
        console.log(comment);
        res.result.forEach(item => {
            html += ` <li>
            <div class="infoR">
                <div class="title">
                    <h4>${item.productName}</h4>
                </div>
                <div class="other">
                    <span class="mall fl">${item.productFrom}|${item.productTime}</span>
                    <i>${item.productTips}</i>
                </div>
                <div class="container">
                  <p>
                      ${item.productImg2}
                      ${item.productInfo2}
                  </p>
                </div>
                <div class="bigimg">
                    ${item.productImgSm}
                </div>
                <div class="city">
                    ${item.productCity}
                </div>
            </div>
        </li>`
            section += `${item.productComment}`
        })
        uu.innerHTML = html;
        comment.innerHTML = section
        // $('#product>.info').html(html)

    }
})